package com.itheima.backstage.manager;

import com.itheima.service.db.UserInfoService;
import com.itheima.vo.PageBeanVo;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class UserInfoManager {
    @Reference
    private UserInfoService userInfoService;
    //分页查询所有用户信息
    public PageBeanVo findUserInfoList(Integer page,Integer pageSize) {
        PageBeanVo pageBeanVo = userInfoService.findUsersByPage(page,pageSize);
        return pageBeanVo;
    }

    //根据id删除用户
    public void deleteById(String id) {
        userInfoService.deleteById(id);
    }
}
